package com.liuyc.test.app.spf

import com.liuyc.lib.perfp.PreferenceManager
import com.liuyc.lib.perfp.PreferenceProperty

/**
 * SharedPreferences 的文件名称为： my_spf
 */
object MyPreferenceManager : PreferenceManager("my_spf") {
    /**
     * 在文件中定义了一个 key = test 默认值为 "默认值" 的key
     */
    var test: String by PreferenceProperty(default = "默认值")

    /**
     * 自定义 key值为 customKey
     */
    var test1: String by PreferenceProperty("customKey",default = "自定义key默认值")

    var testInt: Int by PreferenceProperty(default = 100)

    var testFloat: Float by PreferenceProperty(default = 0.0f)

    var testBoolean: Boolean by PreferenceProperty(default = false)
}